home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / bdiff.arc / BDIFF.DOC < prev    next >
Text File  |  1990-07-16  |  16KB  |  346 lines

  1. BDIFF/BUPDATE: Binary file differencer/updater
  2.  
  3. What they do?
  4. =============
  5.   Bdiff creates a binary difference between two files. On unix like systems,
  6. many people use diff and patch to update source files. They are very powerful
  7. for "line oriented" data. However, they are incapable of handling binary data.
  8.   Modifying a single line in source file amounts to a considerable difference
  9. in its compiled object. Calling address, variable address, segment value, they
  10. will all change even when object's structure remains similar.
  11.   Bdiff creates the difference of two objects. Suppose, the difference will be
  12. much smaller than whole new object file. With bupdate and "old object file",
  13. you can create new object file from the difference file.
  14.  
  15. What's good?
  16. ============
  17.   The merit of size, is very important if you distribute the difference on
  18. line. And there is another reason to use difference. Only the person who
  19. has "old version" can get new version of program. So, you can release the
  20. update information of your charged program (commercial, shareware, etc.).
  21. You do no need to bundle a document again. Cause, who use it, must have a
  22. document bundled with the package of older version.
  23.   Bdiff can pack many difference files into one file. You can see the
  24. information of differences the file contents with bupdate command. With
  25. composite difference file, you can update many files of a package at once.
  26. Of course, not only program file, but document file can be updated with
  27. BDIFF/BUPDATE. It is not so effective than to use diff/patch. Nevertheless,
  28. it is much more convenient.
  29.   Not only differences of different files, you can pack the differences for
  30. same file, but between different versions.
  31.   Suppose you released a program versions 1.1, 1.2, and 1.3. You can not guess
  32. who holds which version. In such case, you can pack respective differences
  33. between 1.1 and 1.2, between 1.2 and 1.3, and finally between 1.3 and the new
  34. version 1.4.
  35.   The holder of the program version 1.2, can update from his version to 1.3
  36. then to 1.4. Bupdate checks the version and does this incremental updating
  37. to the newest and will report its actions on the screen. You just watch it.
  38. Difference data to incremental update, is more effective in the size than
  39. the sum of all differences between new version and every respective version.
  40.  
  41.  
  42. NOTE
  43. ====
  44.   "CURRENT" outputs of Bdiff is not so compact. They must be larger than 1/8
  45. of original program file size. You had better use compressing tools such as
  46. LHarc to get down the size of up- downloading. In future version of Bdiff,
  47. you may expect to have compressed output directly.
  48.   If you use RCS for maintenance of source files, and write RCS header in
  49. the program, you can let Bdiff automatically scan the header. Bdiff will
  50. modify time stamps of files from the scan, and will record revision number
  51. into difference file. This function of Bdiff makes maintenance of version
  52. easier.
  53.   If there is large difference between two files, Bdiff may fail to create
  54. difference. The difference must be smaller than 16KB.
  55.   Bdiff is effective enough for code changing, inserting, and deleting. But
  56. it is not so for moving. Future version may be improved.
  57.  
  58.  
  59. ********** BDIFF
  60.  
  61. Usage:
  62. ======
  63.   BDIFF [-swindow[:rate]] [(-r|-x)] [-i] [-a] [-v[rev:rev]] oldfile newfile [diffile]
  64.  
  65.   You have to assume two file names of old version file, and new version file.
  66. You can not omit them. Of course, they are not the same name. To make
  67. difference between two versions of a.exe, please rename older versions of a.exe
  68. as a.old or such name. Otherwise, place them in different directories.
  69.   You may not modify <newfile> name instead of <oldfile>. Because, This name
  70. is recorded into differnce file, and used on updating.
  71. Bdiff may cause some confusion when it meets a file with version number in
  72. its name.
  73.   The output has the name <diffile> if you specify it, otherwise the output
  74. has the name combined with a prime name of <newfile> and default extension of
  75. ".bdf". You can omit <diffile> argument usually.
  76.  
  77. Suppose you create difference between bdiff123.exe and bdiff124.exe, you type:
  78.  
  79.     bdiff bdiff123.exe bdiff124.exe
  80.  
  81. to have the diffile bdiff124.bdf by default. The name implies that this
  82. diffile is to update a program with name bdiff124.ext not bdiff123.ext.
  83. The file bdiff123.bdf will try to update bdiff123.exe while bdiff124.bdf
  84. searches for bdiff124.exe. You can not expect your user to have bdiff124.exe
  85. since this is going to be the new version. If you type
  86.  
  87.     bdiff bdiff123.exe bdiff124.exe bdiff123.bdf
  88.                                          ^^^^^^^
  89. then you can get the BDF file with proper name. When you omit <diffile>
  90. please be aware of the fact that <diffile> name is recorded in itself.
  91.  
  92.   There are some options. I will describe them below.
  93.  
  94. Options:
  95. ========
  96.   -s:   To assume data span and required match rate in comparing. To assume
  97.         span, use unit of byte. To assume ratio, use unit of per-cent.
  98.         Default value of span is 15 bytes, and rate is 66%. It means if 10
  99.         characters in each 15 succeeding characters of two compared files
  100.         match, Bdiff believes two sets of data synchronize.
  101.         If some data insertion/deletion occurs, data sync is broken. Then,
  102.         Bdiff scans the context, and restart from a new position at which such
  103.         sync is possible.
  104.         Default values are reasonable to compare normal dos executable files.
  105.         However, if you want to compare source/document files, you'd better
  106.         assume large sapn/rate values. For example, -s20:100 option will give
  107.         more effective outputs.
  108.         If you do not specify rate you will have the default value of 80%.
  109.   -r:   Good for source files. Output size remains the same if this option is
  110.         on or off. Nevertheless, "compressed" file size may vary.
  111.         I am not sure if this option may be valid in the future compatibility.
  112.   -x:   Output "reverse" difference data with normal data. BDF files
  113.         created with -x option, supports "version down" if need.
  114.         Note that output contains a part of <oldfile>. Be careful about
  115.         valid dates of copyright statement.
  116.   -i:   Suppress time stamp comparison. Bupdate first check time stamp,
  117.         sum, length of target to insure updating correct file. Of course,
  118.         it is good way to compare time stamp. But if you loose released file,
  119.         and time stamp is unknown (though contents of files are equal),
  120.         use this option.
  121.         RCS header will try to avoid such cases.
  122.   -a:   Append difference data after existing BDF file. With this option,
  123.         you can pack the difference of different files, between different
  124.         versions.
  125.   -v:   You can assume revisions of <oldfile> and <newfile> with this option.
  126.         If you write RCS header in the objects, Bdiff records each version
  127.         number in a difference file. If you don't, it is encouredged to assume
  128.         each version number with this option.
  129.         With -v option, Bdiff refrains from correcting time stamps even with
  130.         RCS header. If you don't want to modify time stamp, use this option.
  131.  
  132. Return value
  133. ============
  134.   0 for normal case, 1 for error.
  135.  
  136. Compatibility with older versions:
  137. ================================
  138.   Omitted.
  139.   PLEASE USE BDIFF1.2x OR LATER.
  140.  
  141. Examples:
  142. =========
  143.   Creating difference between Bdiff.old(1.1) and Bdiff.exe(1.2).
  144.         bdiff bdiff.old bdiff.exe
  145.   will create bdiff.bdf which is a difference between versions 1.1->1.2.
  146.  
  147.   Creating "reverse" difference.
  148.         bdiff -x bdiff.old bdiff.exe
  149.  
  150.   Creating difference between non-RCS headered programs.
  151.         bdiff -v1.1:1.2 bdiff.old bdiff.exe
  152.  
  153.   Add difference of document into created BDF file.
  154.         bdiff -a -s20:100 bdoc.old bdiff.doc bdiff.bdf
  155.   You do not need to specify Extension of "bdiff.bdf".
  156.  
  157.  
  158. ********* BUPDATE
  159.  
  160. Usage:
  161. ======
  162.   BUPDATE (-v | -d | -x [-i[s]] [-r] [-o] [-wdir]) diffile [file[;source]..]
  163.  
  164.   Bupdate updates files using a deference file created by Bdiff. If more
  165. than one difference is encountered in a single BDF file, Bupdate updates
  166. all files required.
  167.   It is also used to display the contents of BDF file, and to remove
  168. some differences in a composite-difference BDF file.
  169.   File names to update, are written in a BDF file. So most simple use,
  170. only BDF file name is required for an argument, regardless of single difference
  171. BDF or multiple differences BDF. To update bdiff.exe from 1.1 to 1.2,
  172. type:
  173.  
  174.        bupdate bdiff.bdf
  175.  or    bupdate bdiff
  176.  
  177. In normal usage, you actually not need to type filename extension ".bdf".
  178.    After updating, extension of original files to update, will be modified
  179. as ".org". If a file with an extension ".org" already exists, its extension
  180. will be renamed as ".nnn" where nnn is a 3 digit number.
  181.   You can also give file name templates after BDF file name. They can
  182. include wildcards in themselves. If they assumed, bupdate procceeds execution
  183. for only files whose name match to the templates. To update exe files only, use
  184. "*.exe" as a template.
  185. Type:
  186.  
  187.        bupdate bdiff *.exe
  188.  
  189. when you have files bdiff.exe and bdiff.doc in the curent directory.
  190.   You can add a "path" for the templates. This is useful in updating files
  191. in some other directory. In case when files to be updated are in drive C:,
  192. type:
  193.         bupdate foo.bdf c:*.*
  194.  
  195.   Updating files must have exactly the same contents to the ones used to
  196. create differences. Bupdate checks time stamps, sums, lengths. For some
  197. reason, if you want time stamp comparison to be ignored, use -i option which
  198. is described below. If -i option was assumed on creating difference, time
  199. comparison is always ignored.
  200.  
  201. Options:
  202. ========
  203.   -v:   Verbosely outputs contents of BDF file. Prints file names to update,
  204.         time stamps of old and new versions of the file, their file size,
  205.         their revisions, and BDF file size.
  206.         This option is useful to see what version is required to update.
  207.  
  208.   -d:   Deletes differences whose name match to file name templates given.
  209.         Original BDF file is renamed as ".bak", and saved.
  210.  
  211.   -x:   Updates files. Without -v and -d options, this option assumed as a
  212.         default.
  213.  
  214.   -i:   Ignores time stamps. If you modified time stamps of updating files
  215.         for some reason(ex. re-compiling), this option will help you.
  216.  
  217.   -is:  Ignores time stamps and sums. This option is useful to update "patched"
  218.         versions of files.
  219.         Assuming you have a1.exe, and a1a.exe watch is patched version of
  220.         a1.exe. When a2.exe, which is a new version of a1.exe, released,
  221.         first creates difference between a1.exe and a2.exe. Then assume it
  222.         to a1a.exe with -is option. You may get a good version of a2a.exe
  223.         under favorable circumustances.
  224.  
  225.   -r:   Updates in reverse order. It means "version down". Create <oldfile>
  226.         from <newfile> for bdiff. Of course, BDF file must be created with
  227.         -x option.
  228.  
  229.   -o:   Omitting backups. As described above, original files are renamed and
  230.         preserved. This is to save disk space when you try incremental
  231.         updates. With this option, all original files are discarded.
  232.         RESERVE ORIGINAL FILES BEFORE UPDATING WITH -o OPTION, OR APPLY TO
  233.         COPIED FILES ONLY.
  234.  
  235.   -w:   Specify Working directory.
  236.  
  237. Return value:
  238. =============
  239. 0 for success updating all files, 1 for error updating at least one file.
  240.  
  241.  
  242. Compatibility to older versions:
  243. ================================
  244. OMITTED. USE BUPDATE1.2x OR LATER.
  245.  
  246.  
  247. Source file assuming:
  248. ====================
  249.   As explained above, <newfile> name is used as a updating file name. If it has
  250. version numbers in it, the kind of trouble you may expect is as follows.
  251. Suppose program distributer is going to update BDIFF123 to BDIFF124.
  252. distributer types:
  253.  
  254.     bdiff bdiff123.exe bdiff124.exe
  255.  
  256. and bdiff124.bdf will be created. What happens then? You as a user have the
  257. difference bdiff124.bdf and bdiff123.exe. While, Bupdate looks for
  258. bdiff124.exe to update. You have to copy bdiff123.exe into bdiff124.exe
  259. or rename so before updating. Sounds complicated.
  260.   In such case, source file assuming will do. You can give a source file name
  261. just after filename templates separated by a semi-colon. Templates are exact
  262. source file names, should not have wildcards. In case above, you type:
  263.  
  264.         bupdate bdiff124.bdf bdiff124.exe;bdiff123.exe
  265.  
  266. to avoid copying. If bdiff124.bdf encounters only one difference, you can
  267. type in short:
  268.  
  269.         bupdate bdiff124 ;bdiff123.exe
  270.  
  271.   After all, I dare to say including a version number in a file name is not
  272. a good manner. Use time stamp instead.
  273.  
  274.  
  275. ************ modtime
  276.  
  277. Usage:
  278.   modtime filename
  279.  
  280.   This program is used to set time stamp according to RCS header included.
  281. Modify time stamp before INITIAL release. It will make you free from
  282. remembering time stamp of released one.
  283.  
  284.  
  285.  
  286. ************ bupmini
  287.  
  288. Usage:
  289.   bupmini bdf_file
  290.  
  291.   This tiny program is for update only. This program does not have the
  292. ability to display or modify the contents of BDF file.
  293. This program acts just as bupdate with -o option, does NOT create backups.
  294. You have to preserve origainal files for your own sake.
  295.   Slightly modified version of bupmini, makes "self updating" BDF file enable.
  296. Please contact us for such version.
  297.  
  298. +-------------------------------------------------------+
  299. |This file is not contained in English Version of Bdiff.|
  300. +-------------------------------------------------------+
  301.  
  302. ************ COPYRIGHT and OTHERS
  303.  
  304.   Term of "this program" described below, means all programs and documents
  305. contained in this archive. And what described below, are affected to this
  306. version only. They may be changed without notice in future.
  307.  
  308. On distributing and using:
  309. ==========================
  310. * All copyrights of this program are reserved by the author.
  311. * You can distribute this program freely if
  312.   - distributing this program only (not with other programs)
  313.   - not changed
  314.   - free without media charge
  315.   - not any copyrights restricted by distributing (it means, for example,
  316.     never upload on a BBS who claims copyrights of uploaded programs).
  317. * You can use this program to create difference free, and release difference
  318.   data created by this program free, regardless of commercial or no-commercial
  319.   base.
  320. * Please contact us to use this program itself (ex. adding  update program
  321.   with difference, and distributing it).
  322. * NO WARRANTY OF THIS PROGRAM. THIS PROGRAM IS SUPPLIED AS-IS.
  323.   WE ASSUME NO LIABILITY FOR DAMAGES DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT
  324.   FROM THE USE OF THIS PROGRAM.
  325.  
  326.  
  327.  
  328.                                                        Toshiyuki TANAKA
  329.                                                        TNT Technology corp.
  330.  
  331.                                                        KAKINOKIZAKA 3-6-7-111,
  332.                                                        MEGURO, TOKYO
  333.                                                        152 JAPAN
  334.  
  335.                                                        +813-795-0168 may accept
  336.                                                        your "AUTO DIALED" fax.
  337.  
  338.                                                        Oversea Users Contact
  339.                                                        K.Okubo Genie,
  340.                                                        74100,2565 Compuserve,
  341.                                                        or E-Mail address:
  342.                                                        c31834@sinet.ad.jp
  343.  
  344.  
  345.  
  346.